#pragma once

#include "cocos2d.h"
USING_NS_CC;
#include "Game/dConfig.h"
#include "Tools/XType.h"

namespace LTGame{

	enum GST_FLAG{
		GST_NONE,
		GST_Logo,
		GST_MainMenu,
		GST_Load,
		GST_Run,
		GST_Script,
		GST_ScriptDlg,
		GS_StatisticsResult,
		GST_SelPlane,
		GST_Help,
		GST_SetMusic,
		GST_About,
		GST_System,
		GST_Ranking,
		GST_GamePass,
		GST_GamePause,
		GST_GameOver,
		GST_GameCG,
		GST_GameSelLevel,
	};

	class GameState
		: public CCTouchDelegate
	{
	public:
		GameState(GST_FLAG flag) : m_flag(flag){};
		virtual ~GameState(void){};

	public:
		virtual void paint(void){};
		virtual bool logic(void) = 0;

		virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent){ return true; };
		virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent){};
		virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent){};

	public:
		GST_FLAG getStateFlag() const{return m_flag;};

	protected:
		GST_FLAG m_flag;
	};
}